<template>
<div id="transform">
  <button @click="getRequest">发送请求1</button>
  <button @click="getRequest2">发送请求2</button>


</div>
</template>

<script>
//借助过渡实现
import axios from 'axios';
export default {
  name: "http-request",
  data(){
    return {
      isShow:true
    }
  },
  methods:{
    getRequest(){
      axios.get("/posts").then(res=>{
        console.log(res)
      })
    },
    getRequest2(){
      axios.get("/comments").then(res=>{
        console.log(res)
      })
    }
  }
}
</script>

<style scoped>


</style>
